﻿using Dapper;
using HBase;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace hCommand {
    public class TransUtil {

        static  public CoreTask getCoreTask(Sw sw, long taskId) {
            string sql = @"select * from Core_task where id=@taskId ";
            List<CoreTask> list = sw.query<CoreTask>(sql, new {
                taskId
            });
            if (list.Count < 1) {
                throw new Exception(taskId + " 任务不存在!");
            }
            return list[0];
        }
        

    }
}
